package com.bacon.gmall.cart.client;

import com.bacon.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author： bacon、
 * @version： 1.0
 * @create： 2021-01-04 16:18
 * @description:
 */

@FeignClient(name = "service-cart")
public interface CartFeignClient {

    @GetMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    void addToCart(@PathVariable Long skuId,
                              @PathVariable Integer skuNum);

    @GetMapping("/api/cart/findCartInfoBySkuId/{skuId}")
    CartInfo findCartInfoBySkuId(@PathVariable Long skuId);

    //对选中的商品下订单
    @GetMapping("/api/cart/findCartListByIsChecked")
    public List<CartInfo> findCartListByIsChecked();
}
